package com.hxw.dubbo.demo;

import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class HelloConsumer {

    @Reference(interfaceClass = HelloApi.class,version = "1.0.0")
    HelloApi helloApi;

    public String getHello(String name){
        return helloApi.sayHello(name);
    }

}
